package cn.com.zetatech.loader.common.message.obj;

import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import lombok.Data;

import java.io.Serializable;

@Data
public class EndOfLotOptions implements Serializable {
    /**
     * 是否启用
     */
    private Boolean enable = Boolean.FALSE;
    private Boolean clustersEnable = Boolean.FALSE;
    private Boolean repeaterEnable = Boolean.FALSE;
    private Boolean dsaEnable = Boolean.FALSE;


    public static EndOfLotOptions fromJsonStr(String endOfLotOptions) {
        if (StrUtil.isBlank(endOfLotOptions)) {
            return new EndOfLotOptions();
        }
        return JSONUtil.toBean(endOfLotOptions, EndOfLotOptions.class,true);
    }

}
